package com.code;

public class CollectParam {
	public static final int PCODE_MCODE = 01;
	public static final int PCODE_CODE = 02;
    private Integer pcode;
    private String pname;
    private String pdata;
    private String pvalue;
    private String unit;
    
	public Integer getPcode() {
		return pcode;
	}
	public void setPcode(Integer pcode) {
		this.pcode = pcode;
	}
	
	public String getPname() {
		return pname;
	}
	public void setPname(String pname) {
		this.pname = pname;
	}
	public boolean pnameIs(String pname){
		return this.pname.equals(pname);
	}
	public String getPdata() {
		return pdata;
	}
	public void setPdata(String pdata) {
		this.pdata = pdata;
	}
	public String getPvalue() {
		return pvalue;
	}
	public void setPvalue(String pvalue) {
		this.pvalue = pvalue;
	}
	public String getUnit() {
		return unit;
	}
	public void setUnit(String unit) {
		this.unit = unit;
	}
	private String evalue;
    public String getEvalue() {
		return evalue;
	}
	public void setEvalue(String evalue) {
		this.evalue = evalue;
	}
	public Object[] array(){
    	Object[] a=new Object[6];
    	a[0]=pcode;
    	a[1]=pname;
    	a[2]=pdata;
    	a[3]=pvalue;
    	a[4]=unit;
    	a[5]=evalue;
    	return a;
    }
    public void array(Object[] a){
    	pcode=(Integer) a[0];
    	pname=(String) a[1];
    	pdata=(String) a[2];
    	pvalue=(String) a[3];
    	unit=(String) a[4];
    	if (a.length==6){
    		evalue=(String)a[5];
    	}
    }
}
